import { StartSceneConfig, StartSceneConfigCategory } from "../../../../../Model/Generate/Server/Config/StartSceneConfig";

export class RealmGateAddressHelper {

    public static GetGate(zone: number, accountId: number): StartSceneConfig {
        const zoneGates = StartSceneConfigCategory.Instance.Gates.TryGetValue(zone);
        const n = accountId.GetHashCode() % zoneGates.length;
        return zoneGates[n];
    }

    public static GetRealm(zone: number): StartSceneConfig {
        const zoneRealm = StartSceneConfigCategory.Instance.Realms.TryGetValue(zone);
        return zoneRealm;
    }

}